#ifndef PREVIEWDIRECTIONSELECTOR_H
#define PREVIEWDIRECTIONSELECTOR_H

#if defined(Viewer3DAPI_DirectionSelector)
#  define Viewer3DAPI_EXPORT Q_DECL_EXPORT
#else
#  define Viewer3DAPI_EXPORT
#endif

#include <QWidget>
#include <QVector3D>

#include "ModelViewer.h"

namespace Ui {
class PreviewDirectionSelector;
}

class Viewer3DAPI_EXPORT PreviewDirectionSelector : public QWidget
{
    Q_OBJECT

public:
    explicit PreviewDirectionSelector(std::shared_ptr<ViewCamera> parent = nullptr);
    ~PreviewDirectionSelector();

signals:
    void updateCameraView();

private slots:
    void on_left_top_clicked();
    void on_right_bottom_clicked();
    void on_left_bottom_clicked();
    void on_right_top_clicked();
    void on_left_clicked();
    void on_top_clicked();
    void on_right_clicked();
    void on_bottom_clicked();
    void on_model_recover_clicked();
    void on_record_latest_clicked();
    void on_recover_origin_clicked();

private:
    Ui::PreviewDirectionSelector *ui;
    std::shared_ptr<ViewCamera> m_sptr_viewCamera;
    QVector3D m_original_model_pos, m_original_model_center, m_original_model_up;
    QVector3D m_latest_model_pos, m_latest_model_center, m_latest_model_up;
};

#endif // PREVIEWDIRECTIONSELECTOR_H
